<template>
    <div class="container">
        <my-header></my-header>
        <component :is="type" @changeType="changeType"></component>
    </div>
</template>
<script>
import MyHeader from "../../components/MyHeader"
import LoginBox from "../Login/components/LoginBox"
import RegisterBox from "../Login/components/RegisterBox"
export default {
    name:'Login',
    components:{
        MyHeader:MyHeader,
        LoginBox:LoginBox,
        RegisterBox:RegisterBox
    },
    data(){
        return{
            type:"LoginBox"
        }
    },
    methods:{
        changeType:function(type){
            this.$data.type = type;
        }
    }
}
</script>
<style lang="scss" scoped>
html,body{
    width:100%;
    height: 100%;
}
.container{
    width: 100%;
    height: 100%;
    background-color: #eee;
}
</style>